package com.simon.springbootdemo.controller;

import com.simon.springbootdemo.bean.User;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("hello")
public class HelloWorldController {

    @GetMapping("/world")
    public ResponseEntity<Void> hello() {
        User simon = new User("simon", 30);
        return new ResponseEntity(simon, HttpStatus.OK);
    }

}
